import java.util.Scanner;
 
public class Lesson7 {
    public static void main(String[] args) {
        // 创建Scanner对象用于接收用户输入
        Scanner userInput = new Scanner(System.in);
        
        // 提示用户输入分钟数
        System.out.print("Enter the number of minutes: ");
        long totalMinutes = userInput.nextLong();
        
        final int MINUTES_PER_DAY = 24 * 60;
        final int DAYS_PER_YEAR = 365;
        long totalDays = totalMinutes / MINUTES_PER_DAY;
        
        // 计算年数和剩余天数
        long approxYears = totalDays / DAYS_PER_YEAR;
        long remainingDays = totalDays % DAYS_PER_YEAR;
        
        // 输出结果（使用格式化字符串）
        System.out.printf("%d minutes is approximately %d years and %d days%n", 
            totalMinutes, approxYears, remainingDays);
        
        // 关闭Scanner资源
        userInput.close();
    }
}